import type { IQueryCourseContent, IQueryCourseQuestions } from '@/interface/api';
import type { ICourseMenu, ICourseQuestions } from '@/interface/course';
import request from '@/utils/request';

export const queryCourseMenu = (): Promise<ICourseMenu[]> => {
  return request({
    method: 'get',
    url: '/user_subjects/',
  });
};

export const queryCourseContent = (data: IQueryCourseContent): Promise<{ content: string }> => {
  return request({
    method: 'get',
    url: '/user_content/',
    params: data,
  });
};

export const queryCourseExamPaper = (data: IQueryCourseQuestions): Promise<ICourseQuestions[]> => {
  return request({
    method: 'get',
    url: '/user_examination/',
    params: data,
  });
};
